﻿@using Partner.Surround.Web.Startup
@using Partner.Surround.Web.Views.Shared.Components.RightNavbarLanguageSwitch
@using Partner.Surround.Web.Views.Shared.Components.RightNavbarUserArea
@using Partner.Surround.Web.Views.Shared.Components.SideBarMenu
@{
    ViewBag.Title = L("HomePage");
    ViewBag.CurrentPageName = PageNames.HomePage;
}

@section styles{
    <link href="~/libs-ext/famfamfam-flags/dist/sprite/famfamfam-flags.min.css" rel="stylesheet" asp-append-version="true" />
}

<!-- 布局框架 -->
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <ul class="layui-nav layui-layout-left">
            <li class="collaspe layui-nav-item layui-hide-xs"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
            <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1"></a></li>
        </ul>
        <div id="control" class="layui-layout-control"></div>
        <ul class="layui-nav layui-layout-right">
            @*@await Component.InvokeAsync(typeof(RightNavbarLanguageSwitchViewComponent))*@
            <li class="layui-nav-item layui-hide-xs"><a href="#" class="fullScreen layui-icon layui-icon-screen-full"></a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="http://www.pearadmin.cn" class="layui-icon layui-icon-website"></a></li>
            <li class="layui-nav-item layui-hide-xs" id="headerNotice"></li>
            @await Component.InvokeAsync(typeof(RightNavbarUserAreaViewComponent))
            <li class="setting layui-nav-item"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-logo">
            <img class="logo" src="~/images/logo.png" />
            <span class="title">Pear Admin</span>
        </div>
        @await Component.InvokeAsync(typeof(SideBarMenuViewComponent))
    </div>
    <div class="layui-body">
        <div id="content"></div>
    </div>
</div>

<!-- 移动端 遮盖层 -->
<div class="pear-cover"></div>

<!-- 初始加载 动画-->
<div class="loader-main">
    <div class="loader"></div>
</div>

<!-- 聊天组件 -->
<div id="social"></div>

<!-- 移动端 的 收缩适配 -->
<div class="collaspe pe-collaspe layui-hide-sm">
    <i class="layui-icon layui-icon-shrink-right"></i>
</div>

@section scripts{
    <script type="text/javascript">
        layui.use(['pearAdmin', 'jquery', 'pearSocial', 'layer', 'pearTab', 'pearNotice'], function () {
            var pearAdmin = layui.pearAdmin;
            var $ = layui.jquery;
            var pearTab = layui.pearTab;
            var pearNotice = layui.pearNotice;
            var layer = layui.layer;
            var pearSocial = layui.pearSocial;

            var config = {
                keepLoad: 1000, // 主 页 加 载 过 度 时 长 可为 false
                muiltTab: true, // 是 否 开 启 多 标 签 页 true 开启 false 关闭
                control: false, // 是 否 开 启 多 系 统 菜 单 true 开启 false 关闭
                theme: "dark-theme", // 默 认 主 题 样 式 dark-theme 默认主题 light-theme 亮主题
                index: '@Url.Action("TenantConsole","WorkSpace")', // 默 认 加 载 主 页
                async: false,
                notice: '/data/notice.json', // 消 息 列 表 数 据
            };

            var setting = {
                elem: 'social'
            };

            pearSocial.render(setting);
            pearAdmin.render(config);
        });
    </script>
}
